import {useRef} from "react";

export function SearchBar(props) {

    const inputRef = useRef()

    return <span style={{textAlign: "right"}}>
        <input ref={inputRef} type={"text"} style={{whiteSpace: "nowrap"}} placeholder={"搜索"} onChange={(item) => {
            props.onTextChange(inputRef.current.value)
        }}/>
        <span style={{marginLeft: "15px", cursor: "pointer"}} onClick={() => {
            props.onTextSearch(inputRef.current.value)
        }}>搜索</span>
    </span>
}


export function EmptyPage(props) {

    return <div style={{
        width: "100%", height: "500px", textAlign: "center",
    }}>
        <p style={{
            marginTop: "300px"
        }}>空寂如那一潭水</p>
    </div>
}
